package tushare

import (
	"tushare/model"
	"tushare/model/tushare"
)

func RaisingLimit() {
	stocks := model.StockList()
	for _, v := range stocks {
		d := tushare.RaisingLimitDays(2, v.TsCode)
		if len(d) < 1 {
			continue
		}

		if d[0].PctChg >= 9.949 && d[1].PctChg >= 9.949 {
			rls := tushare.RaisingLimitStruct{}
			rls.TsCode = v.TsCode
			rls.ContinuousDays = 2
			tushare.RaisingLimitCreate(rls)
		}
	}
}
